package com.db_tenant;

import io.ebean.config.CurrentTenantProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
class ThreadLocalTenant implements CurrentTenantProvider {

  @Autowired
  ReadWriteContext context;

  @Override
  public Object currentId() {
    return context.get();
  }
}
